import request from "./http";

// https://api.ecook.cn/pub/home/recommend/data/disorder
export function getRecommendData(num){
    return request({
        url:`pub/home/recommend/data/disorder?size=${num}`,
        method:"get",
    })
}
// https://api.ecook.cn/public/getRecipeListByType.shtml?type=latest&id=0
export function getRecipeListByTypeData(type,num){
    return request({
        url:`public/getRecipeListByType.shtml?type=${type}&size=${num}&id=0`,
        method:"get",
    })
}
// https://api.ecook.cn/public/getContentsBySubClassid.shtml?id=7136465&page=1
export function getContentsBySubClassidData(id,num){
    return request({
        url:`public/getContentsBySubClassid.shtml?id=${id}&page=1&size=${num}`,
        method:"get",
    })
}
// https://api.ecook.cn/pub/category/recipe?categoryId=1&days=7&page=1&size=20
export function getCategoryData(id,typeId,num){
    return request({
        url:`pub/category/recipe?categoryId=${id}&days=${typeId}&page=1&size=${num}`,
        method:"get",
    })
}
//新手入门菜谱
//https://api.ecook.cn/public/getCollectionSortDetailById.shtml
export function getCollectionSortDetailData(data){
    return request({
        url:"public/getCollectionSortDetailById.shtml",
        method:"post",
        params:data
    })
}